﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Admin.Core.DbContexts/SSPivotDbContext 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       SSPivotDbContext
* 创建时间：  2025/5/24 18:35:14
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using Microsoft.EntityFrameworkCore;
using SSPivot.Admin.Core.DbModel.sys;
using SSPivot.AspNetCore.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Admin.Core.DbContexts
{ 
   public partial class SSPivotDbContext : AppDbContext<SSPivotDbContext>
    {
        public SSPivotDbContext(DbContextOptions<SSPivotDbContext> options) : base(options)
        {

        }
        #region sys
        public virtual DbSet<sys_dict> sys_dict { get; set; }
        public virtual DbSet<sys_dict_type> sys_dict_type { get; set; }
        public virtual DbSet<sys_login_log> sys_login_log { get; set; }
        public virtual DbSet<sys_opts_log> sys_opts_log { get; set; }
        public virtual DbSet<sys_msg> sys_msg { get; set; }
        public virtual DbSet<sys_msg_type> sys_msg_type { get; set; }
        public virtual DbSet<sys_msg_user> sys_msg_user { get; set; }
        public virtual DbSet<sys_org> sys_org { get; set; }
        public virtual DbSet<sys_role_org> sys_role_org { get; set; } 
        public virtual DbSet<sys_role_permission> sys_role_permission { get; set; }
        public virtual DbSet<sys_role> sys_role { get; set; } 
        public virtual DbSet<sys_permission> sys_permission { get; set; } 
        public virtual DbSet<sys_user_role> sys_tag { get; set; }
        public virtual DbSet<sys_user_org> sys_tag_category { get; set; }
        public virtual DbSet<sys_user> attachment { get; set; } 
        #endregion

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);

            //builder.Entity<admin_user>(b =>
            //{
            //    b.ToTable(EducationConsts.DbTablePrefix + "admin_user", EducationConsts.DbSchema);
            //    b.Property(e => e.LoginName).HasMaxLength(50).IsRequired();
            //    b.HasIndex(e => e.LoginName);
            //});
        }
    }
}
